﻿/* 
 *  作者：张维锋
 *  创建时间：2011/6/5 16:20
 *  类说明：员工信息表操作类
 */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using Orf.Model;
using System.Windows.Forms;

namespace Orf.dto
{
    public class employeeInfoDAO
    {
        SqlHelper sqlhelper = null;
        public employeeInfoDAO()
        {
            sqlhelper = new SqlHelper();
        }
        public DataTable  selectEmpInfo(DIC_YGDM empClass)
        {
            DataTable  dt = null;
            try
            {
                string sql = "select * from view_employeeInfo where loginname=@loginname and pwd=@pwd ";
                SqlParameter[] paras = new SqlParameter[] { 
                  new SqlParameter("@loginname",empClass.loginName),
                  new SqlParameter("@pwd",empClass.pWD)};
                dt = new DataTable();
                dt = sqlhelper.ExecuteQuery(sql, paras, CommandType.Text);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }

            return dt;
        }
    }
}
